package study.saas.order.entity;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import study.saas.common.viewmodel.BaseObject;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;


@Data
@Entity
@Table(name = "commodity",indexes = {
        @Index(name = "commodityName_index",columnList = "commodityName")
})
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Commodity extends BaseObject {

    @Column
    private Integer amount;

    @Column(length = 64)
    private String commodityName;

    @Column
    private BigDecimal price;

    @Column
    private Integer isDeleted;

    @Column
    private Integer keyId;
}
